<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>属性选择器</title>
  <style>
    [title] {
      background-color: blanchedalmond;
    }
    [title="atguigu1"] {
      color: chocolate;
    }
    /* 以 a 开头 */
    [title^="a"] {
      font-size: 20px;
    }
    /* 以 u 结尾 */
    [title$="u"] {
      font-weight: 900;
    }
    /* 包含有 u */
    [title*="u"] {
      width: 200px;
      height: 200px;
    }
  </style>
</head>
<body>
  <div title="atguigu1">尚硅谷1</div>
  <div>尚硅谷2</div>
  <div title="atguigu3">尚硅谷3</div>
  <div title="4guigu">尚硅谷4</div>
  <div title="5guigu">尚硅谷5</div>
</body>
</html>